.PHONY:libnetwork.so clean

SRCS := $(notdir $(shell find *.c)) #find all .c files
OBJECTS	:= $(patsubst %.c,%.o,$(SRCS)) # all object files


libcstl.so:$(OBJECTS)
	ld -share $^ -o $@
	mv -f $@ $(ROOTDIR)/lib/

%o:%c
	gcc -c $^ -o $@ $(INCFLAG)
	
clean:
	-@rm -rf *.o
	-@rm -rf *.so
	-@rm -rf *.a
	-@rm -rf *.orig